package com.itheima.reggie.service;

import com.itheima.reggie.bean.AddressBook;

import java.util.List;

public interface AddressBookService {

    /**
     * 获取用户所有地址
     * @return
     */
    List<AddressBook> list();

    /**
     * 添加地址
     * @param addressBook
     * @return
     */
    int addAddress(AddressBook addressBook);

    /**
     * 修改地址
     * @param addressBook
     * @return
     */
    int updateAddress(AddressBook addressBook);

    /**
     * 删除地址
     * @param addressId
     * @return
     */
    int deleteAddress(Long addressId);

    /**
     * 查询单个地址
     * @param addressId
     * @return
     */
    AddressBook addressFindOne(Long addressId);

    /**
     * 设置默认地址
     * @param addressBook
     * @return
     */
    int setDefaultAddress(AddressBook addressBook);

    /**
     * 获取默认地址
     * @return
     */
    AddressBook getDefaultAddress();
}
